package com.zhaokuner.provider.application;

import com.alibaba.fastjson.JSON;
import com.zhaokuner.parentstarter.utils.JacksonUtils;
import com.zhaokuner.provider.service.backup.model.vo.UserVO;

import java.util.HashMap;

/**
 * <p>
 * Description: test main
 * <p>
 * Copyright: 天津联想协同科技有限公司
 * <p>
 *
 * @author 赵希坤 zhaoxikun
 * @date 2021/2/11 10:11
 */
public class T {

    public static void main(String[] args) throws NoSuchMethodException {
        HashMap<String, Object> map = new HashMap<>();
        map.put("name", "赵婉");
        map.put("h", 1111);
        String json = JacksonUtils.toJson(map);
        Object o = JSON.parseObject(json, UserVO.class);
        //Object o = JacksonUtils.readValue(json, UserVO.class);
        System.out.println(o);
    }
}
